<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<shield:permssion type="button">
<form action="${ctxPathA}/oa/booksmanage/addOrUpdate" method="post" autocomplete="off" class="show-info">
	<shield:token/>
    <input id="id" name="id" type="hidden" maxlength="100" value="${model.id }">
    <table class="tab-show">
    	<colgroup>
    		<col width="18%">
    		<col width="32%">
    		<col width="18%">
    	</colgroup>
        <tr>
	    	<th>
            	<label><font color="red">*</font>书名称：</label>
        	</th>
         	<td colspan="3"><input type="text" name="bookName" value="${model.bookName}"></td>
		</tr>
        <tr>
	    	<th>
            	<label>作者：</label>
        	</th>
         	<td colspan="3"><input type="text" name="author" value="${model.author}"></td>
		</tr>
		<tr>
            <th><label>新闻缩略图：</label></th>
            <td colspan="3">
            	<!-- uploadContainer上传容器用于多个文件时区分不同容器 -->
                <div class="clearfix uploadContainer">
					<!-- imgPath存放图片路径 -->
  					<input class="imgPath" name="imgPath" type="hidden" value="${model.imgPath }"/>
					<div class="img" style="margin-right: 10px; float: left; border: 1px solid #eee;">
<c:choose>
	<c:when test="${not empty model.imgPath }">
						<!-- imgShow预览图片imgPreview_plugin为鼠标悬停放大插件 -->
						<img id="imageNews" class="imgShow imgPreview_plugin" name="imageNews" width="70" src="${model.imgPath }">
	</c:when>
	<c:otherwise>
				   		<img id="imageNews" class="imgShow imgPreview_plugin" name="imageNews" width="70" src="${ctxPath }/images/project/nopic.jpg">
	</c:otherwise>
</c:choose>
					</div>
                    <div class="option" style="float: left;">
                        <div class="ms imageUpload" style="padding-top:10px"><input type="button" class="sumbit button" value="上传图片"></div>
                        <div class="tips">1、建议上传186 *125尺寸图片 <br/>2、支持的图片类型：JPG,JPEG,GIF,BMP,PNG</div>
                    </div>
                </div>
            </td>
        </tr>
		<tr>
	    	<th>
            	<label><font color="red">*</font>购买日期：</label>
        	</th>
         	<td><input type="text" name="buyDate" value="${model.buyDate}" class="Wdate"></td>
	    	<th>
            	<label>购买价格：</label>
        	</th>
         	<td><input type="text" name="buyPrice" value="${model.buyPrice}" style="width: 140px;">&nbsp;元</td>
		</tr>
        <tr>
	    	<th>
            	<label>借阅状态：</label>
        	</th>
         	<td>
         		<select name="borrowState" data-v="${model.borrowState}">
		    		<option value="">选择</option>
		    		<option value="0">可借阅</option>
		    		<option value="1">已借阅</option>
		    		<option value="2">其他</option>
		    	</select>
         	</td>
	    	<th>
            	<label>当前借阅人：</label>
        	</th>
         	<td>
         		<!-- autocompleteTips提示，data-event表示触发事件，默认为keyup，data-tips-url为调取地址 ,value-to表示对于返回值中的属性，如果name与value-to一致可以不定义-->
         		<input type="text" name="borrowerName" value="${model.borrowerName}" value-to="userName" class="autocompleteTips" 
	         	 data-tips-url="${ctxPathA}/system/common/getUsers"  style="width: 140px;">
	         	 <input name="borrowerId" type="hidden" value="" value-to="userId"></td>
		</tr>
        <tr>
	    	<th>
            	<label>状态：</label>
        	</th>
         	<td colspan="3"><shield:switchOput data="正常|-1=删除" value="${model.state }"></shield:switchOput></td>
		</tr>
    </table>
    <div class="taCenter">
		<input class="button" type="submit" value="提交"/>
    	<input class="button default" type="reset" value="重置"/>
    </div>
</form>
</shield:permssion>